Described below are a method and device for generating a database for a database query, and a search method and search device for querying a database.
Information values such as flight data or stock exchange prices are today made available to a user by databases. There are for that purpose a multiplicity of database languages by which the respective database can be described and queried in a structured manner. One way is to use RDF/OWL (RDF: Resource Description Framework; OWL: Web Ontology Language, as described, for example, in Wikipedia on Apr. 15, 2009) which is a representative example of describing databases by semantic relationships. Information values in the form of nodes are described therein, two nodes and a directed edge between the two nodes being designated in each case as an RDF triple. The two nodes therein represent a subject and an object and the directed edge represents a predicate. The predicate therein generally defines a semantic relationship between the subject and object. This will be explained in more detail with the aid of an example according to FIG. 1. The node B therein represents the subject “Person”, the node A the object “Mario”, and the directed edge a the predicate “has name”. The RDF triple “BaA” is thus read as “Person has name Mario”. Chaining RDF triples of such kind will produce a graph structure constituting a directed graph; see FIG. 1 for example. Triples have a bold frame in FIG. 1.
A query language SPARQL (SPARQL: SPARQL Protocol and RDF Query Language, as described, for example, in Wikipedia on Apr. 15, 2009) can serve for querying an information value of the database according to RDF/OWL. One or more RDF triples of the database are searched for that purpose starting from a predefinable node, meaning from a specific information value; see in FIG. 1, for example, the RDF triples with a bold frame (BaA, HjJ, IkK). For querying the RDF triples, meaning for a semantic query, a searched subgraph is realized by indicating all RDF triples that are involved. To indicate the aforementioned three RDF triples it is hence necessary to specify chains of RDF triples that include the RDF triples framed in FIG. 2. This is a process that makes a semantic database query complex and time-consuming because extensive knowledge of the structure of the database is necessary even when the database query is submitted.